#define _GNU_SOURCE
#include "app_pool.h"
#include "log/log.h"
#include "unistd.h"
void *thread_pool_task(void *arg){

    log_debug("%s,%ld",(char *)arg,gettid());
    return NULL;
}

int main(int argc, char const *argv[])
{
    app_pool_init(5);
    for (int i = 0; i < 20; i++)
    {
        char *name = malloc(30);
        sprintf(name,"thread_pool_task_%d",i);
        app_pool_registerTask(thread_pool_task,name);
    }
    
    sleep(1);
    app_pool_close();
    return 0;
}
